from database.db import movieCol, videoCol, delete_movie
from detail import md5

if __name__ == '__main__':
    # ret = movieCol.update_many({'updated': -1}, {'$set': {'updated': 1}})
    # print(ret.modified_count)
    cursor = movieCol.find({'updated': -1}, {'url': 1, 'title': 1, '_id': 1})
    for movie in cursor:
        url = movie['url']
        print(url)
        if 'https://www.hao6v.com' in url:
            print('删除电影', movie)
            delete_movie(movie)

